<template>
	<view class="col-center-horizotal">
		<view class="bg">
			<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
				<u-form-item label="渠道商名称" prop="userInfo.name" ref="item1" labelWidth="90" :required="true">
					<u-input v-model="model1.userInfo.name" border="none" class="input-bg"
						style="padding-left: 20rpx;"></u-input>
				</u-form-item>
				<u-form-item label="可合作产品" prop="userInfo.name" ref="item1" labelWidth="90">
					<u-input v-model="model1.userInfo.name" border="none" class="input-bg"
						style="padding-left: 20rpx;"></u-input>
				</u-form-item>
				<u-form-item label="联系人" prop="userInfo.name" ref="item1" labelWidth="90" :required="true">
					<u-input v-model="model1.userInfo.name" border="none" class="input-bg"
						style="padding-left: 20rpx;"></u-input>
				</u-form-item>
				<u-form-item label="联系电话" prop="userInfo.name" ref="item1" labelWidth="90" :required="true">
					<u-input v-model="model1.userInfo.name" border="none" class="input-bg"
						style="padding-left: 20rpx;"></u-input>
				</u-form-item>
				<u-form-item label="渠道商介绍" prop="userInfo.name" ref="item1" labelWidth="90">
					<u-input v-model="model1.userInfo.name" border="none" class="input-bg"
						style="padding-left: 20rpx;"></u-input>
				</u-form-item>
			</u-form>
		</view>
		<view class="btn row-center" @click="goSuccess">
			保存
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
					model1: {
								userInfo: {
									name: '',
									sex: '',
								},
							},
				rules: {
					'userInfo.name': {
						type: 'string',
						required: true,
						message: '请填写姓名',
						trigger: ['blur', 'change']
					},
				}
			}
		},
		onReady() {
			//如果需要兼容微信小程序，并且校验规则中含有方法等，只能通过setRules方法设置规则。
			this.$refs.uForm.setRules(this.rules)
		},
		methods: {
			goSuccess() {

			}
		}
	}
</script>
<style>
	page {
		background-color: #F6F7F9;
	}
</style>
<style lang="scss" scoped>
	.bg {
		padding: 31rpx;
		margin: 31rpx;
		background: #FFFFFF;
		border-radius: 25rpx;
		border: 1rpx solid #EFEFEF;
	}

	.input-bg {
		padding: 15rpx 15rpx;
		width: 465rpx;
		height: 83rpx;
		background: #F6F7F9;
	}

	.btn {
		margin-top: 53rpx;
		width: 625rpx;
		height: 83rpx;
		background: #0D59D1;
		border-radius: 10rpx;
		font-weight: 500;
		font-size: 29rpx;
		color: #FFFFFF;
		line-height: 46rpx;
	}
</style>